<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateTableEkbApplyHistory extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('ekb_apply_history', function (Blueprint $table) {
            $table->id();

            $table->string("orderNo", 36)->default("")->comment("开店单号");
            $table->json("content")->comment("提交表单内容");
            $table->string("flowId", 36)->default("")->comment("单据id");
            $table->json("approveResult")->comment("表单审批结果");
            $table->tinyInteger("status")->default(0)->comment("状态");

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->tinyInteger('isDeleted')->default(0)->comment('是否删除 0 否 1是');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment = '易快报 - 退款单提交记录';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('ekb_apply_history');
    }
}
